package com.icehand.demo.vo;

import com.icehand.demo.enums.CodeEnums;
import lombok.Data;

@Data
public class BaseResultVO<T> {
    /**
     * 错误代码
     */
    private int c = 0;

    /**
     * 返回的数据实体
     */
    private T d;

    /**
     * 返回的错误信息
     */
    private String m = "success";

    public BaseResultVO(CodeEnums codeEnums) {
        this.c = codeEnums.getCode();
        this.m = codeEnums.getMsg();
    }

    public BaseResultVO(T d) {
        this.d = d;
    }

    public BaseResultVO(int c, String m) {
        this.c = c;
        this.m = m;
    }
}
